
#include <iostream>
using namespace std;

#include "ProgCommon.h"
#include "MinHeap.h"


template<class T>
void ShowList( T a[], int from, int to )
{
    cout << "[ ";
    for ( int i = from; i <= to; i++ ) {
        cout << a[i] << " ";
    }
    cout << "]";
}

int main()
{
    PROG_BANNER;

    ConSetColor( FG_CYAN );
    printf( "Prog 6: MinHeap Impl\n" );
    ConSetColor( COLOR_DEFAULT );
    printf( "\n" );

    MinHeap<int> H( 7 );
    int x;

    H.Insert( 7 ).Insert( 5 ).Insert( 3 ).Insert( 1 );
    H.Output();

    printf( "\n * Now we add 2 to it\n" );
    H.Insert( 2 );
    H.Output();

    printf( "\n * We delete min val : " );
    H.DeleteMin( x );
    printf( "%d\n", x );
    printf( "\n * After delete\n" );
    H.Output();

    PROG_BANNER;
    PROG_PAUSE;
    return 0;
}

